package com.design.pattern.create.singleton;

/**
 * 单例模式(静态内部类内部类)
 *
 * @author gyf
 * @create 2018-12-01 14:50
 **/
public class SingleInnerClass {
    private SingleInnerClass() {

    }

    public static SingleInnerClass getInstance() {
        return SingleInnerHolder.SINGLE_INNER_CLASS;
    }

    private static class SingleInnerHolder {
        private static final SingleInnerClass SINGLE_INNER_CLASS = new SingleInnerClass();
    }
}
